The present invention relates to sound processing in general, and to methods and systems for dynamically adjusting the gain of sound detection system, in particular.
U.S. Pat. No. 5,841,385 to Xie, entitled xe2x80x9cSystem and method for performing combined digital/analog automatic gain control for improved clipping suppressionxe2x80x9d describes a system and method for automatic gain control on received audio data. The system comprises an analog adjustable gain amplifier coupled to a digital gain control unit. The gain control unit comprises a long-term energy averager and gain calculator as well as a short-term energy averager and gain calculator, which receive the digital audio output signal. The gain calculators periodically generate gain adjustment outputs based on the average energy of the signal so as to attenuate or amplify the analog audio signal. The gain control unit further comprises a voice activity detector, which detects a presence of silence versus voice activity based on ratios of the long-term and short-term energy averages. The long-term averager pauses operation during silence. The gain control system amplifies the audio input signal only during the voice activity, thus suppressing noise amplification during periods of silence.
It is an object of the present invention to provide a novel method and system for controlling the audio gain factor of a speech processing system.
I accordance with the present invention, there is thus provided a method for operating a speech processing system, characterized by a finite range of audio levels. The speech processing system receives an incoming audio signal and amplifies it by an audio gain factor. The speech processing system represents the amplified audio signal by the finite range of audio levels. The method includes the steps of: decreasing the audio gain factor when detecting clipping of the amplified audio signal, maintaining the audio gain factor for a hold time period, and increasing the gain factor when detecting that the result of amplification of the incoming sound levels by the audio gain factor, is lower than the highest level of the finite range of audio levels.
According to one aspect of the invention, the clipping can be determined where the result of amplification of the incoming sound levels by the audio gain factor, exceeds the highest level of the finite range of audio levels. Alternatively, clipping can be determined where the result of amplification of the average of the incoming sound levels by the audio gain factor, exceeds the highest level of the finite range of audio levels. According to another aspect of the invention, the clipping is determined where the result of amplification of RMS value of the incoming sound levels by the audio gain factor, exceeds the highest level of the finite range of audio levels. According to a further aspect of the invention, the clipping is determined where a mapped value of the result of amplification of RMS value of the incoming sound levels by the audio gain factor, exceeds the highest level of the finite range of audio levels.
The step of decreasing can be performed in the presence of speech. Accordingly, the method can further include a step of detecting speech in the incoming audio signal.
According to one aspect of the invention, the hold time period can be predetermined. The method can further include the step of determining the hold time period. According to another aspect of the invention, the hold time period can be variable. The method can further include a step of receiving the incoming audio signal.
The method of the present invention is applicable for both analog and digital incoming audio signals.
The step of increasing the gain factor can be preformed at a predetermined increase rate. Alternatively, the step of increasing the gain factor can be preformed at a variable increase rate. Hence, the method of the present invention can further include a step of determining a rate for increasing the gain factor. It is noted that this rate can be determined according to the above result.
According to a further aspect of the invention, the step of decreasing can be performed in the presence of speech. It can also be performed in performed continuously or discretely.
In accordance with a further aspect of the invention, there is thus provided a gain control system including a signal clipping detector, a hold mode unit, a release mode unit and a controller, connected to the signal clipping detector, the hold mode unit and the release mode unit. The clipping detector detects clipping of incoming audio signal, with respect to the current gain factor and a predetermined sampling range. The controller decreases the gain factor according to the detected clipping. The controller initiates the hold mode unit to maintain the decreased gain factor for a hold time period. The controller further initiates the release mode unit when the hold time period expires. The release mode unit determines an increase rate for increasing the gain factor.
The gain control system of the invention can further include a voice activity detector, connected to the controller, for initiating the signal-clipping detector in the presence of voice activity. In addition, the gain control system can further include an input interface connected to the controller, for receiving the incoming audio signal. The gain control system of the invention, can further include an RMS energy calculator for, connected to the controller, a look-up table, connected to the RMS energy calculator and a maximum detection unit, connected between the look-up table and the controller.
The RMS energy calculator continuously produces RMS values of portions of the incoming audio signal. The look-up table assigns a peek value for each the RMS values. The maximum detection unit determines a maximum peek value of successive ones of the peek values and provides the maximum peek value to the controller for further detection of clipping.